//
//  Connection.h
//  NewYear
//
//  Created by dllo on 15/3/2.
//  Copyright (c) 2015年 dllo. All rights reserved.
//


// 网络请求
#import <Foundation/Foundation.h>

//发现>新闻首页
#define Z_FindingNew @"http://api.m.mtime.cn/News/NewsList.api?"
//发现>新闻详情
#define Z_FindingNewDetail @"http://api.m.mtime.cn/News/Detail.api?"
//发现>新闻表头
#define Z_FindingNewHeader @"http://api.m.mtime.cn/PageSubArea/GetRecommendationIndexInfo.api"

//发现>预告片首页
#define Z_FindingTralier @"http://api.m.mtime.cn/PageSubArea/TrailerList.api"


//@protocol sendConnectionGetDelegate <NSObject>
//
//- (void)sendData:(NSData *)data flag:(NSInteger )flag;
//
//@end
@interface Connection : NSObject<NSURLConnectionDataDelegate>
@property (nonatomic,retain)NSMutableData *recive;
- (void)startConnection:(NSString *)urlStr parmaters:(NSDictionary *)parmaters;
//+ (void)connectionWithUrl:(NSString *)urlStr parmaters:(NSMutableDictionary *)parmaters  delegate:(id<sendConnectionGetDelegate>)delegate flag:(NSInteger )flag;
//
//@property(nonatomic,assign)id<sendConnectionGetDelegate>delegate;
@property(nonatomic,assign)NSInteger flag;



// Block

+ (void)connectionWithUrl:(NSString *)urlStr parmaters:(NSMutableDictionary *)parmaters  block:(void(^)(NSData *data))block;
@property(nonatomic,copy)void(^secBlock)(NSData *data);
@end
